home *** CD-ROM | disk | FTP | other *** search
- /*
- xDEF tester.c
- Copyright 1989 Josh Pritikin
- All rights reserved.
-
- This code may be used freely in any programming project, no string attached.
-
- To use this general xDEF testing code all you need to do is create a
- resource (any size) of the kind of xDEF you want to test. Then call the
- routine below with the type, id and real procedure for the particular
- xDEF. Your xDEF need to be in a lock segment of your application.
-
-
- Change History
-
- 12.19.89 Created and tested.
- 12.19.89 v1.0 Release
-
- I can be reached at different speed at:
-
- fast ->
- internet: 6500stom@ucsbuxa.ucsb.edu
- AppleLink: 6500stom%ucsbuxa@hub.ucsb.edu@DASNET#
- CIS: 70771,2131@(internet gateway...)
- slow ->
- GEnie: J.Pritikin
- AppleLink: Josh.P
- very slow ->
- CIS: 70771,2131
- */
-
- typedef struct {
- int jump;
- void* add;
- } defRec, *defPtr, **defHdl;
-
- Boolean InitXDEF(long type, int id, void* realdef)
- {
- defHdl thedef;
-
- thedef = GetResource(type, id);
- if (!thedef) {
- DebugStr("\pCouldn't get XDEF resource.");
- return true;
- }
-
- HNoPurge(thedef);
- SetHandleSize(thedef, sizeof(defRec));
-
- (**thedef).jump = 0x4ef9;
- (**thedef).add = realdef;
-
- return false;
- }
-